<?php 
namespace Api\Controller;
use Think\Controller;
class ContactController extends BaseController{
	public function contact(){
		//查询员工表获得信息
		$contact=M('yuangong');
		$data=$contact->select();
		$this->ajaxReturn(['code'=>101,'msg'=>'查询成功','data'=>$data]);
	}
	public function search(){
		$title = I('post.title','','trim');
		//$title=I('post.title');
		$contact=M('yuangong');
		//写查询条件
		$data=$contact->where(['Yg_Name'=>['like',"%$title%"]])->select();
		$this->ajaxReturn(['code'=>101,'msg'=>'查询成功','data'=>$data]);


	}






}



















 ?>